package com.wang.jmonkey.ca.handler.code;

import com.wang.jmonkey.ca.model.ValidateCode;
import com.wang.jmonkey.common.constant.ValidateConstant;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Description 获取验证码handler
 * @Author HeJiawang
 * @Date 2021/5/11 9:42
 */
public interface ValidateCodeHandler {

    ValidateCode build(ValidateConstant.ValidateCodeType validateCodeType,
                       HttpServletRequest request, HttpServletResponse response);

    void save(ValidateCode validateCode);

    void send(ValidateCode validateCode, HttpServletResponse response);

    boolean validate(HttpServletRequest request);
}
